package com.example.makerspace.service.impl;

import com.example.makerspace.dto.ParticipantsDTO;
import com.example.makerspace.dto.Result;
import com.example.makerspace.manager.DataManager;
import com.example.makerspace.service.DataService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public class DataServiceImpl implements DataService {

    @Resource
    private DataManager dataManager;

    @Override
    public Result visit() {
        return dataManager.visitData();
    }

    @Override
    public Result applicationData() {
        return dataManager.applicationData();
    }

    @Override
    public Result participants() {
        return Result.success(new ParticipantsDTO(153L));
    }

    @Override
    public Result latestNews() {
        return dataManager.latestNews();
    }

    @Override
    public Result latestApplication() {
        return dataManager.latestApplication();
    }
}
